// Copyright (C) 2025 Focus Media Holding Ltd. All Rights Reserved.

package cn.pacerx.running.db.enums;

import lombok.Getter;

/**
 * UserActivityStatusEnum
 *
 * @author zhanglingwei@focusmedia.cn
 * @since 2025-07-09
 */
@Getter
public enum UserActivityStatusEnum {
    /**
     * 已报名
     */
    JOINED(0),
    /**
     * 已签到 先不起作用
     */
    SIGN_IN(1),
    /**
     * 未签到 先不起作用
     */
    UN_SIGN_IN(2);

    private final int value;

    UserActivityStatusEnum(int value) {
        this.value = value;
    }


    public static UserActivityStatusEnum getByValue(int code) {
        for (UserActivityStatusEnum e : values()) {
            if (e.value == code) {
                return e;
            }
        }
        throw new IllegalArgumentException("Invalid value: " + code);
    }
}
